package com.trendytech.tds.message.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.trendytech.tds.entity.SystemPropEntity;
import com.trendytech.tds.message.dao.ISystemPropDAO;

import hm.base.dao.impl.AbstractDAO;

@Repository
public class SystemPropDAOImpl extends AbstractDAO<SystemPropEntity> implements ISystemPropDAO {
	
	private static final String MAPPER_SELECT_VALUES_BY_IP = "selectValuesByIp";
	private static final String MAPPER_SELECT_LATEST_BY_IP = "selectLatestByIp";
	
	@Override
	public List<SystemPropEntity> getItemValuesByIp(String ip) {
		return sqlSession.selectList(getMapperId(MAPPER_SELECT_VALUES_BY_IP), ip);
	}

	@Override
	public SystemPropEntity getLatestByIP(String ip) {
		return sqlSession.selectOne(getMapperId(MAPPER_SELECT_LATEST_BY_IP), ip);
	}
	
}
